package cn.me.alphamq.nameserver.util;

import cn.me.alphamq.nameserver.cache.Container;
import cn.me.alphamq.nameserver.config.NameServerProperties;

/**
 * nameserver 的工具类
 *
 * @author f
 */
public class NameServerUtil {

    /**
     * 校验客户端的身份
     *
     * @param username 用户名
     * @param password 密码
     * @return
     */
    public static boolean verifyAuth(String username, String password) {
        NameServerProperties nameServerProperties = Container.getNameServerProperties();
        return nameServerProperties.getNameServerUsername().equals(username)
                && nameServerProperties.getNameServerPassword().equals(password);
    }

}
